import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import Search from '../views/Search.vue'
import Details from '../views/Details.vue'
import MyCart from '../views/MyCart.vue'
import Order from '../views/Order.vue'
import Login from '../views/Login.vue'
import Pay from '../views/Pay.vue'
import PaySuccess from '../views/PaySuccess.vue'
import MyOrder from '../views/MyOrder.vue'
import Register from '../views/Register.vue'
import Deal from '../views/Deal.vue'
import DealDetail from '../views/Dealdetail.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    component: Home
  },
  {
    path: '/search',
    name: 'search',
    component: Search
  },
  {
    path: '/details',
    name: 'details',
    component: Details
  },
  {
    path: '/cart',
    name: 'mycart',
    component: MyCart
  },
  {
    path: '/order',
    name: 'order',
    component: Order
  },
  {
    path: '/login',
    name: 'login',
    component: Login
  },
  {
    path: '/pay',
    name: 'pay',
    component: Pay
  },
  {
    path: '/paysuccess',
    name: 'paysuccess',
    component: PaySuccess
  },
  {
    path: '/myorder',
    name: 'myorder',
    component: MyOrder
  },
  {
    path: '/register',
    name: 'register',
    component: Register
  },
  {
    path: '/deal',
    name: 'deal',
    component: Deal
  },
  {
    path: '/Dealdetail',
    name: 'deal-detail',
    component: DealDetail
  }
]
const router = new VueRouter({
  routes
})

export default router
